package com.teddy.DTXMB.Service.Impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.teddy.DTXMB.Mapper.CustomMapper;
import com.teddy.DTXMB.Model.Custom;
import com.teddy.DTXMB.Service.CustomService;

@Service
public class CustomServiceImpl implements CustomService {
	
	@Autowired 
	private CustomMapper customMapper;
	
    public Custom getCustom(String name, String pwd){
    	
    	String customPwd = customMapper.getCustomPwd(name);
    	if (pwd.equals(customPwd)){
    		return customMapper.getCustom(name);
    	}
    	else{
    		return null;
    	}
    }
    
    public String getCustomPwd(String name){
    	return customMapper.getCustomPwd(name);
    }
}
